<?php

namespace app\common\model;

use think\Model;

class Assetsinfos extends Model
{
    protected $append = [
        
        'Publisher',
        'Clinch',
        
        ];
        
    protected $autoWriteTimestamp = true;
    public function users()
    {
        return $this->belongsTo('User', 'userid', 'id');
    }
    public function userss()
    {
        return $this->belongsTo('User', 'otheruserid', 'id');
    }
  
    public function getCidAttr($value, $data)
    {
            return 'SPpay';
       
    }
    public function getPublisherAttr($value, $data)
    {
        if($this->users){
            return $this->users->getData('nickname');
        }else{
            return '';
        }
        
    }
    public function getClinchAttr($value, $data)
    {
        if($this->userss){
            return $this->userss->getData('nickname');
        }else{
            return '';
        }
        
    }
   
}
